from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from Zk.Zk3.Page.Page import Page
import pytest,time

# pytest夹具
@pytest.fixture(scope='session',autouse=True)
def driver():
    driver=webdriver.Firefox()
    # 窗口最大化
    driver.maximize_window()
    driver.get('https://www.jd.com/')
    time.sleep(3)
    yield driver
    # 退出
    driver.quit()

def test_case(driver):
    po=Page(driver)
    po.test_jingdong()
